package com.ygqh.baby.controller.admin;

import java.util.Date;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.ygqh.baby.ao.QueryInfo;
import com.ygqh.baby.ao.ResultSet;
import com.ygqh.baby.po.YgPublishAccusation;
import com.ygqh.baby.service.YgPublishAccusationService;

@Controller
@RequestMapping("/admin/complain")
public class ComplainController extends BaseController<Object, java.lang.Long>{
	
	@Autowired
	private YgPublishAccusationService ygPublishAccusationService;
	
	@RequestMapping("searchComplain")
	@ResponseBody
	public Map<String, Object> searchCategory(String q, QueryInfo queryInfo,String nickName,Date startDate,Date endDate){
		ResultSet<YgPublishAccusation> resultSet = ygPublishAccusationService.search(queryInfo, q, nickName, startDate, endDate);
	   return resultSet.toDatatables(null);
	}
}
